//
//  MovieCell.m
//  UI-13-DouBan--
//
//  Created by lanou3g on 15/8/25.
//  Copyright (c) 2015年 自由科技. All rights reserved.
//

#import "MovieCell.h"
#import "Movie.h"

@implementation MovieCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setViews];
    }
    return self;
}
//
- (void)setViews{
    UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 365, 130)];
    imgView.image = [UIImage imageNamed:@"bg_eventlistcell"];
    [self addSubview:imgView];
    
    _iconImgView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 90, 120)];
    _iconImgView.backgroundColor = [UIColor yellowColor];
    [imgView addSubview:_iconImgView];
    
    _movieNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(120, 50, 235, 30)];
    _movieNameLabel.font = [UIFont boldSystemFontOfSize:20];
    //    _labelName.backgroundColor = [UIColor cyanColor];
    [imgView addSubview:_movieNameLabel];
}

- (void)setMovie:(Movie *)movie{
    _movieNameLabel.text = movie.movieName;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
